package com.cxcy.swustlearner.service.Impl;

import com.cxcy.swustlearner.mapper.MajorMapper;
import com.cxcy.swustlearner.pojo.Major;
import com.cxcy.swustlearner.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MajorServiceImpl implements MajorService {
    @Autowired
    private MajorMapper majorMapper;
    @Override
    public List<Major> getMajors() {
        return majorMapper.selectAllMajor();
    }

    @Override
    public void addMajor(Major major) {
        majorMapper.insertMajor(major);
    }
}